/////precompiled////////
#include "precompiled.h"
////////////////////////


#include "prs_FrmScrollBar.h"
using namespace prs;

// TRuleFrmVScrollBar //////////////////////////////////////////////////////////

//
TRuleFrmVScrollBar::TRuleFrmVScrollBar(
  snt::text::TContext &Context,
  svl::TVariant &VParentNode,
  TRuleFrmChildrenBase &RChildren,
  TRuleSetNodeIdOptionally &RSetNodeIdOptionally,
  TRuleFrmGeom &RFrmGeom,
  TRuleSetStyle &RStyle
) 
:vParentNode(VParentNode)
,rGeometry(RFrmGeom)
{
  snt::text::TSequence T(Context);
  snt::text::TKeyword K(Context);
  snt::TFVoid F;
  TFuncNewNodeIntoAttrOldChildren FNewNode;
  snt::TReturn Return;

  this->Name(GetClassName()).Local(vParentNode)
  | K.New("vScrollBar") & FNewNode.New(vParentNode,TNodeFrmVScrollBar()) 
    & RSetNodeIdOptionally.New() & RAttr.New() 
    & Return.New()
  ;
  
  RAttr
  | T.New("(") 
    & RAttr1.New() & RChildren.New() 
    & T.New(")") & Return.New()
  | Return.New()
  ;

  RAttr1
  | AAttr1.New()
  ;
  AAttr1
  | RStyle.New() & AAttr1.New()
  | F.New(this,&TRuleFrmVScrollBar::FSetGeometry) & RFrmGeom.New() & AAttr1.New()
  | Return.New()
  ;
}

// TRuleFrmHScrollBar //////////////////////////////////////////////////////////

//
TRuleFrmHScrollBar::TRuleFrmHScrollBar(
  snt::text::TContext &Context,
  svl::TVariant &VParentNode,
  TRuleFrmChildrenBase &RChildren,
  TRuleSetNodeIdOptionally &RSetNodeIdOptionally,
  TRuleFrmGeom &RFrmGeom,
  TRuleSetStyle &RStyle
) 
:vParentNode(VParentNode)
,rGeometry(RFrmGeom)
{
  
  snt::text::TSequence T(Context);
  snt::text::TKeyword K(Context);
  snt::TFVoid F;
  TFuncNewNodeIntoAttrOldChildren FNewNode;
  snt::TReturn Return;

  this->Name(GetClassName()).Local(vParentNode)
  | K.New("hScrollBar") & FNewNode.New(vParentNode,TNodeFrmHScrollBar()) 
    & RSetNodeIdOptionally.New() & RAttr.New() 
    & Return.New()
  ;
  
  RAttr
  | T.New("(") 
    & RAttr1.New() & RChildren.New() 
    & T.New(")") & Return.New()
  | Return.New()
  ;

  RAttr1
  | AAttr1.New()
  ;
  AAttr1
  | RStyle.New() & AAttr1.New()
  | F.New(this,&TRuleFrmHScrollBar::FSetGeometry) & RFrmGeom.New() & AAttr1.New()
  | Return.New()
  ;
  
}
